﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_Friend.aspx.cs" Inherits="V5_EShop.Admin.Admin_Friend" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>友情链接</title>
    <!--#include file="inc/libs.aspx"-->
</head>
<body>
    <table border="0" cellpadding="0" cellspacing="0" class="toptable" width="100%">
        <tr>
            <td class="topnavichar" style="padding-left: 14px">
                <div align="left">
                    位置导航：<a class="list_link" href="Admin_Index_Main.aspx" target="main">首页</a><img alt=""
                        border="0" src="/sysImages/folder/navidot.gif" />友情链接</div>
            </td>
        </tr>
    </table>
    <br />
    <table align="center" border="0" cellpadding="0" cellspacing="0" class="Navitable"
        width="100%">
        <tr>
            <td align="left">
                <a href="Admin_Friend.aspx">管理链接</a> | <a href="Admin_Friend.aspx?Action=edit">添加</a>
            </td>
        </tr>
    </table>
    <br />
    <form runat="server" id="form1">
    <asp:MultiView ID="MultiViewList" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:GridView ID="gvList" runat="server" OnRowCommand="gvList_RowCommand" AutoGenerateColumns="False"
                CssClass="listtable" GridLines="None">
                <HeaderStyle CssClass="headertext" />
                <Columns>
                    <asp:BoundField DataField="ID" HeaderText="ID">
                        <ItemStyle Width="30px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="FriendTitle" HeaderText="网站名称" />
                    <asp:TemplateField HeaderText="网站Logo">
                        <ItemTemplate>
                            <img alt="" src='<%# DataBinder.Eval(Container.DataItem,"FriendLogo") %>' width="88"
                                height="31" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "IsShow").ToString() == "1" ? "正常" : "隐藏"%>
                        </ItemTemplate>
                        <ItemStyle Width="50px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%#Eval("ID") %>'
                                CommandName="go">修改</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument='<%#Eval("ID") %>'
                                CommandName="del">删除</asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle Width="150px" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            &nbsp;
            <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条"
                FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页" NextPageText="下一页"
                OnPageChanged="Pager_PageChanged" PageIndexBoxType="DropDownList" PageSize="20"
                PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
                TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </webdiyer:AspNetPager>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <table cellpadding="5" cellspacing="1" class="edittable">
                <tr>
                    <td colspan="2">
                        <asp:Label ID="lblTitle" runat="server" Text="添加友情链接"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                        网站名称：
                    </td>
                    <td>
                        <asp:TextBox ID="txtFriendTitle" runat="server" Width="253px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        网站地址：
                    </td>
                    <td>
                        <asp:TextBox ID="txtFriendUrl" runat="server" Width="304px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        网站图标：
                    </td>
                    <td>
                        <asp:TextBox ID="txtFriendLogo" runat="server" Width="304px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        网站简介：
                    </td>
                    <td>
                        <asp:TextBox ID="txtFriendReadme" runat="server" Height="99px" TextMode="MultiLine"
                            Width="442px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        是否显示：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlIsShow" runat="server">
                            <asp:ListItem Text="显示" Value="1"></asp:ListItem>
                            <asp:ListItem Text="隐藏" Value="0"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:HiddenField ID="txtID" runat="server" Value="0" />
                        <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="添加保存" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
    </form>
</body>
</html>
